<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <!-- 2.准备一个容器 -->
     <div id="app">
     <h1> Vue的模板</h1>
     <button v-if="activeIndex>0" @click="activeIndex--">上一页</button><br>
     <img v-bind:src="imgList[activeIndex]" alt=""><br>
     <button v-if="activeIndex<imgList.length-1" @click="activeIndex++">下一页</button>
  
     </div>
    <!-- 1.导入 vue.js -->
     <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
     <script>
         // 3.创建一个Vue实例
     const app=new Vue({
        // 容器
        el:'#app',
        // 数据
        data:{
          activeIndex:0,
          imgList: [
          './imgs/11-00.gif',
          './imgs/11-01.gif',
          './imgs/11-02.gif',
          './imgs/11-03.gif',
          './imgs/11-04.png',
          './imgs/11-05.png',
        ],
        },
        // 事件处理函数需要写到methods 对象结构中
        methods:{
           
        }
     
     })
     </script>
</body>
</html>